<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head>
        <title>Finance Resource Planning</title>
    </h:head>
    <f:view beforePhase="#{UserDisplayManagedBean.doDisplay}">

        <h:body>
            <h:form>
                <p:growl id="msgs" showDetail="true"/>
                  <!-- IDLE DIALOG for -->
                        <p:confirmDialog message="You have been idle for 5 minutes. Do you want to continue?"  
                                         showEffect="bounce" hideEffect="explode"  
                                         header="Warning message" severity="alert" widgetVar="confirmation">  
                            <p:commandButton value="Yes" onclick="confirmation.hide()" type="button" /> 
                            <p:commandButton value="No" update="panel" oncomplete="confirmation.hide()"  
                                             actionListener="#{UserManagedBean.doLogout}" /> 
                        </p:confirmDialog>
                <div id="top" class="top">
                    <h:graphicImage value="/image/newHeader.jpg"/>
                </div>

                <div id="content">
                    <p:poll interval="2"   
                        actionListener="#{MessageManagedBean.checkNewMessage}" update="msgs" />
                    
                        <p:panel style=" border-color:transparent; height:570px; width:1290px">
                            <center>
                            <p:menu style="width:600px;height:500px; font-family: Tahoma;font-size:large;border-bottom-width: 20%;border-style: dashed">  
                                 <p:submenu label="Finance Menu">  
                                    <p:menuitem value="Finance Dept Home" url="http://localhost:8080/MerlionERP-war/FRM/FinanceDeptWorkspace.xhtml" ajax="false" icon="ui-icon ui-icon-home"/>  
                                </p:submenu>
                                <p:submenu label=" Credit Profiles">
                                    <p:menuitem value="Add New Credit Profile" url="http://localhost:8080/MerlionERP-war/FRM/addCreditProfile.xhtml" ajax="false" icon="ui-icon ui-icon-document"/>  
                                    <p:menuitem value="View Credit Profiles" url="http://localhost:8080/MerlionERP-war/FRM/viewCreditProfile.xhtml" ajax="false" icon="ui-icon ui-icon-search" />
                                    <p:menuitem value="Perform Credit Check" url="http://localhost:8080/MerlionERP-war/FRM/CreditCheck.xhtml" ajax="false" icon="ui-icon ui-icon-search" />
                                </p:submenu>
                                <p:submenu label=" Invoices">
                                    <p:menuitem value="Add New Invoice" url="http://localhost:8080/MerlionERP-war/FRM/addInvoice.xhtml"   ajax="false" icon="ui-icon ui-icon-document" />
                                    <p:menuitem value="View All Invoices" url="http://localhost:8080/MerlionERP-war/FRM/viewInvoice.xhtml"   ajax="false" icon="ui-icon ui-icon-search" />
                                    <p:menuitem value="View Outstanding Invoices" url="http://localhost:8080/MerlionERP-war/FRM/viewOutstandingInvoice.xhtml"   ajax="false" icon="ui-icon ui-icon-search" />
                                    <p:menuitem value="View Overdue Invoices" url="http://localhost:8080/MerlionERP-war/FRM/viewOverdueInvoice.xhtml"   ajax="false" icon="ui-icon ui-icon-search" />
                                </p:submenu>
                                <p:submenu label="Refund">
                                    <p:menuitem value="View Pending Refunds" url="http://localhost:8080/MerlionERP-war/FRM/ViewRefundEntity.xhtml"   ajax="false" icon="ui-icon ui-icon-search" />
                                </p:submenu>
                                <p:submenu label="Payment">
                                    <p:menuitem value="Perform Customer Payment" url="http://localhost:8080/MerlionERP-war/FRM/PerformPayment.xhtml"   ajax="false" icon="ui-icon ui-icon-cart" />
                                    <p:menuitem value="View Payment History" url="http://localhost:8080/MerlionERP-war/FRM/ViewCustomerPaymentJournal.xhtml"   ajax="false" icon="ui-icon ui-icon-search" />

                                </p:submenu>
                            </p:menu>  
                            <p:commandButton type="submit" value="Logout" actionListener="#{UserManagedBean.doLogout}"/> 
                            </center>
                        </p:panel>
                </div>
                <div id="bottom" class="footer">
                    <h:graphicImage value="/image/merlionfooter.jpg"/>
                </div>
            </h:form>
        </h:body>
    </f:view>
</html>

